/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-11-10 16:51:31
 * @LastEditTime: 2023-01-05 18:32:13
 */
import {
  SET_BAKCHART_DATA,
  SET_BAKTABLE_DATA,
  SET_RECCHART_DATA,
  SET_RECTABLE_DATA
} from '../constants';

export const BackupAndMaintenanceReducer = (state, action) => {
  switch (action.type) {
    case SET_BAKCHART_DATA:
      return {
        ...state,
        dataBakList: action.data
      };
    case SET_BAKTABLE_DATA:
      return {
        ...state,
        chartBakList: action.data
      };
    case SET_RECCHART_DATA:
      return {
        ...state,
        dataRecList: action.data
      };
    case SET_RECTABLE_DATA:
      return {
        ...state,
        chartRecList: action.data
      };
    default:
      console.log('untouched', action);
      return state;
  }
};
